package com.zxy.ziems.server.dto;

import java.util.ArrayList;
import java.util.List;

/**
 * 资源树
 * @description:
 * @author: 邓伟
 * @date: 2022/4/14 19:46
 */
public class ResourceTree {

    /**
     * 资源ID
     */
    private String resourceId;

    /**
     * 资源名称
     */
    private String resourceName;

    /**
     * 路由
     */
    private String url;

    /**
     * 父节点
     */
    private String parentResourceId;

    /**
     * 资源类型
     * 0.菜单，1.按钮，2.目录
     */
    private Integer resourceType;

    /**
     * 排序
     */
    private Integer sortNo;

    /**
     * 是不是按钮
     */
    private Boolean buttonFlag;

    /**
     * 子节点
     */
    private List<ResourceTree> children;

    public ResourceTree() {
        this.children = new ArrayList();
    }

    public ResourceTree(String resourceId, String resourceName, String url, String parentResourceId, Integer resourceType, Integer sortNo, Boolean buttonFlag) {
        this.resourceId = resourceId;
        this.resourceName = resourceName;
        this.url = url;
        this.parentResourceId = parentResourceId;
        this.resourceType = resourceType;
        this.sortNo = sortNo;
        this.buttonFlag = buttonFlag;
        this.children = new ArrayList<>();
    }

    public String getResourceId() {
        return resourceId;
    }

    public void setResourceId(String resourceId) {
        this.resourceId = resourceId;
    }

    public String getResourceName() {
        return resourceName;
    }

    public void setResourceName(String resourceName) {
        this.resourceName = resourceName;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getParentResourceId() {
        return parentResourceId;
    }

    public void setParentResourceId(String parentResourceId) {
        this.parentResourceId = parentResourceId;
    }

    public Integer getResourceType() {
        return resourceType;
    }

    public void setResourceType(Integer resourceType) {
        this.resourceType = resourceType;
    }

    public Integer getSortNo() {
        return sortNo;
    }

    public void setSortNo(Integer sortNo) {
        this.sortNo = sortNo;
    }

    public List<ResourceTree> getChildren() {
        return children;
    }

    public void setChildren(List<ResourceTree> children) {
        this.children = children;
    }

    public Boolean getButtonFlag() {
        return buttonFlag;
    }

    public void setButtonFlag(Boolean buttonFlag) {
        this.buttonFlag = buttonFlag;
    }
}
